package com.dongdongshop.configresult;

import com.dongdongshop.em.ResultEnum;

import java.io.Serializable;

public class Result implements Serializable {

    private Integer code;//1 成功 2 :失败

    private String massager;//状态

    private Object resout;//返回的数据

    public static Result builResult(ResultEnum e){
        Result result = new Result(e.getCode(), e.getMassage());
        return result;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMassager() {
        return massager;
    }

    public void setMassager(String massager) {
        this.massager = massager;
    }

    public Object getResout() {
        return resout;
    }

    public Result setResout(Object resout) {
        this.resout = resout;
        return this;
    }

    public Result() {
    }

    public Result(Integer code, String massager) {
        this.code = code;
        this.massager = massager;
    }

    public Result(Integer code, String massager, Object resout) {
        this.code = code;
        this.massager = massager;
        this.resout = resout;
    }
}
